/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package presenter;

import view.Tela;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import model.AnalisadorLexico;

/**
 *
 * @author Dikson
 */
public class PresenterView {

    Tela tela;
    AnalisadorLexico analisador;

    public PresenterView(Tela tela) {

        tela.setVisible(true);

        tela.getBtnAnaliseLexica().addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                AnalisadorLexico lexico = new AnalisadorLexico(tela.getTextArea().getText());
                lexico.analisaCodigo();
            }
        });
    }
}
